from django.shortcuts import render, HttpResponse


# Create your views here.
def index(request):
    return HttpResponse('ok')


from django.views.decorators.csrf import csrf_exempt, csrf_protect,ensure_csrf_cookie


# @csrf_exempt
# @csrf_protect
def form(request):
    return render(request, 'form.html')


from django.views import View
from django.utils.decorators import method_decorator

# @method_decorator(csrf_exempt,name='dispatch')
class Form(View):

    @method_decorator(ensure_csrf_cookie)
    def get(self, request):
        return render(request, 'form.html')


    def post(self, request):
        return render(request, 'form.html')
